$(document).ready(function(){		
	$("#frmConvert").validate({						
		errorClass		: "errorMessage",
		errorElement	: "span",
		onfocusout		: false,
		onkeyup			: false,
		rules: {	
			ptlike:{
				required	: true,
				minValue	: true,
				maxValue	: true
			}
		},
		messages: {	
			ptlike:{
				required	: tlike_required,
				minValue	: tlike_min,
				maxValue	: tlike_max
			}
		},		
		errorPlacement: function(label, element) {			
			var id = element.attr("id");			
			label.insertAfter($("#" + id));			
		},
		submitHandler: function(form) {
			strTlike = $('#ptlike').val();
			$("#ptlike").val(replaceAll(strTlike,".",""));		
			form.submit();
		}
	});
	$.validator.addMethod("minValue",function(){
		var strTlike	= $('#ptlike').val();
		var intTlike	= parseInt(replaceAll(strTlike,".",""));
		if(intTlike < 10) {
			return false;
		}
		return true;
	});
	$.validator.addMethod("maxValue",function(){
		var strCurTlike = $('#pcur_tlike').html();
		var strTlike	= $('#ptlike').val();
		var intCurTlike	= parseInt(replaceAll(strCurTlike,".",""));
		var intTlike	= parseInt(replaceAll(strTlike,".",""));
		if(intCurTlike < intTlike) {
			return false;
		}
		return true;
	});
	/**------------*/
	$("#frmTransfer").validate({						
		errorClass		: "errorMessage",
		errorElement	: "span",
		onfocusout		: false,
		onkeyup			: false,
		rules: {	
			pcur_von_p:{
				required	: true
			}
		},
		messages: {	
			pcur_von_p:{
				required	: von_required
			}
		},		
		errorPlacement: function(label, element) {			
			var id = element.attr("id");			
			label.insertAfter($("#" + id));			
		},
		submitHandler: function(form) {
			strVon = $('#pcur_von_p').val();
			$("#pcur_von").val(replaceAll(strVon,".",""));		
			form.submit();
		}
	});
});
convertVon = function(intRate) {
	var strTlike = $('#ptlike').val();
	var intTlike = replaceAll(strTlike,".","");
	var intVon	 = parseInt(intTlike/intRate);		
	$('#pvon_convert').val(addPointerByValue(intVon));
}